<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>选择属性包含某个值的</title>
    <style>
        div[class*="top"]{
            color:purple;
        }
    </style>
</head>
<body>
    <div class="icon1-top-1">top1</div>
    <div class="icon2-top-1">top2</div>
    <div class="icon3-top-1">top3</div>
    <div class="icon4-nothing-1">top4</div>
</body>
</html>